CREATE TABLE [dbo].[TTCIER_VTCP]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[AA_PERI] [dbo].[TD_IN_004_ANOS] NOT NULL,
[NU_PERI] [dbo].[TD_IN_002_MESE] NOT NULL,
[ST_CIER_VTAS] [dbo].[TD_VC_003] NOT NULL,
[ST_CIER_COMP] [dbo].[TD_VC_003] NOT NULL,
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TTCIER_VT__CO_US__5066D2A5] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TTCIER_VT__FE_US__515AF6DE] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TTCIER_VT__CO_US__524F1B17] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TTCIER_VT__FE_US__53433F50] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTCIER_VTCP] WITH NOCHECK ADD CONSTRAINT [CK__TTCIER_VT__AA_PE__4E7E8A33] CHECK NOT FOR REPLICATION (([AA_PERI]>(1980)))
GO
ALTER TABLE [dbo].[TTCIER_VTCP] WITH NOCHECK ADD CONSTRAINT [CK__TTCIER_VT__NU_PE__4F72AE6C] CHECK NOT FOR REPLICATION (([NU_PERI]>=(0) AND [NU_PERI]<=(13)))
GO
ALTER TABLE [dbo].[TTCIER_VTCP] ADD CONSTRAINT [PK__TTCIER_V__AD4C726C787FB0F7] PRIMARY KEY CLUSTERED  ([CO_EMPR], [AA_PERI], [NU_PERI]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTCIER_VTCP] ADD CONSTRAINT [FK__TTCIER_VT__CO_EM__47FC752D] FOREIGN KEY ([CO_EMPR]) REFERENCES [dbo].[TMPARA_TESO] ([CO_EMPR])
GO
